//
//  BzrwCell.swift
//  Auscultation
//
//  Created by 来 on 2020/12/8.
//

import UIKit

class BzrwbCell: UITableViewCell {
    
    var tzzx: UILabel!
    var sj: UILabel!
    var wj: UILabel!
    
    var image_view3: UIImageView!
    var yh: UILabel!
    var status: UILabel!


    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.selectionStyle = .none
        
        tzzx = UILabel.init()
        tzzx.lgf_AddShowAllText()
        tzzx.text = "停诊中心-001"
        tzzx.font = UIFont.systemFont(ofSize: 16)
        tzzx.textColor = UIColor.init(lgf_HexString: "222222")
        contentView.addSubview(tzzx)
        tzzx.snp.makeConstraints { (make) in
            make.top.equalTo(25)
            make.left.equalTo(17)
        }

        let image_view = UIImageView.init(image: #imageLiteral(resourceName: "shijian@1.5x"))
        contentView.addSubview(image_view)
        image_view.snp.makeConstraints { (make) in
            make.top.equalTo(tzzx.snp.bottom).offset(15)
            make.left.equalTo(tzzx)
            make.width.height.equalTo(12)
        }

        sj = UILabel.init()
        sj.lgf_AddShowAllText()
        sj.text = "2020.06.01-2020.06.1"
        sj.font = UIFont.systemFont(ofSize: 12)
        sj.textColor = UIColor.init(lgf_HexString: "8D969D")
        contentView.addSubview(sj)
        sj.snp.makeConstraints { (make) in
            make.centerY.equalTo(image_view)
            make.left.equalTo(image_view.snp.right).offset(7)
        }
        
        let image_view2 = UIImageView.init(image: #imageLiteral(resourceName: "wenjian"))
        contentView.addSubview(image_view2)
        image_view2.snp.makeConstraints { (make) in
            make.top.equalTo(tzzx.snp.bottom).offset(15)
            make.left.equalTo(sj.snp.right).offset(10)
            make.width.height.equalTo(12)
        }

        wj = UILabel.init()
        wj.text = ""
        wj.lgf_AddShowAllText()
        wj.font = UIFont.systemFont(ofSize: 12)
        wj.textColor = UIColor.init(lgf_HexString: "8D969D")
        contentView.addSubview(wj)
        wj.snp.makeConstraints { (make) in
            make.centerY.equalTo(image_view2)
            make.left.equalTo(image_view2.snp.right).offset(7)
        }
        
        image_view3 = UIImageView.init(image: #imageLiteral(resourceName: "icon-"))
        contentView.addSubview(image_view3)
        image_view3.snp.makeConstraints { (make) in
            make.top.equalTo(tzzx.snp.bottom).offset(15)
            make.left.equalTo(wj.snp.right).offset(10)
            make.width.height.equalTo(12)
        }

        yh = UILabel.init()
        yh.text = ""
        yh.lgf_AddShowAllText()
        yh.font = UIFont.systemFont(ofSize: 12)
        yh.textColor = UIColor.init(lgf_HexString: "8D969D")
        contentView.addSubview(yh)
        yh.snp.makeConstraints { (make) in
            make.centerY.equalTo(image_view3)
            make.left.equalTo(image_view3.snp.right).offset(7)
        }

        status = UILabel.init()
        status.text = ""
        status.lgf_AddShowAllText()
        status.textAlignment = .center
        status.font = UIFont.systemFont(ofSize: 11)
        status.backgroundColor = UIColor.init(lgf_HexString: "FFC28A")?.withAlphaComponent(0.1)
        status.textColor = UIColor.init(lgf_HexString: "F27C0F")
        status.layer.borderColor = UIColor.init(lgf_HexString: "FFC28A")?.cgColor
        status.layer.borderWidth = 1
        status.layer.cornerRadius = 4
        contentView.addSubview(status)
        status.snp.makeConstraints { (make) in
            make.centerY.equalTo(tzzx)
            make.right.equalToSuperview().offset(-17)
            make.width.equalTo(65)
            make.height.equalTo(19)
        }
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
    }

}
